<template>
  <div id="tab-bar">
    <TabBarItem path="/home">
      <img slot="item-icon" src="@/assets/imgs/cart.png" alt="" />
      <img slot="item-icon-active" src="@/assets/imgs/cart-o.png" alt="" />

      <template slot="text">
        <p>首页</p>
      </template>
    </TabBarItem>
    <TabBarItem path="/category">
      <img slot="item-icon" src="@/assets/imgs/category.png" alt="" />
      <img slot="item-icon-active" src="@/assets/imgs/category-o.png" alt="" />

      <template slot="text">
        <p>分类</p>
      </template>
    </TabBarItem>

    <TabBarItem path="/my">
      <img slot="item-icon" src="@/assets/imgs/my.png" alt="" />
      <img slot="item-icon-active" src="@/assets/imgs/my-o.png" alt="" />

      <template slot="text">
        <p>我的</p>
      </template>
    </TabBarItem>
    <TabBarItem path="/cart">
      <img slot="item-icon" src="@/assets/imgs/cart.png" alt="" />
      <img slot="item-icon-active" src="@/assets/imgs/cart-o.png" alt="" />

      <template slot="text">
        <p>购物车</p>
      </template>
    </TabBarItem>
  </div>
</template>

<script>
import TabBarItem from "./TabBarItem";
export default {
  name: "TabBar",

  data() {
    return {};
  },
  components: {
    TabBarItem,
  },
  mounted() {},

  methods: {},
};
</script>

<style scoped>
#tab-bar {
  width: 100%;
  display: flex;
  background-color: #f6f6f6;
  box-shadow: 0 -1px 1px rgba(100, 100, 100, 0.2);
  position: fixed;
  bottom: 0;
  left: 0;
}
img {
  width: 24px;
  height: 24px;

  vertical-align: middle;
}
</style>
